-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a Kill Service Workers algorithm #1440
base: main
Are you sure you want to change the base?
Conversation
Intended to be a killswitch mechanism for all service workers associated with an origin. 1. "Unclaim" all service workers for the origin. In other words, ensure no clients are controlled by any service worker under the origin 2. Terminate all in-flight tasks, but allow fetch tasks to fallback to network 3. Immediately unregister all registrations under the origin
I'm digging into this. It feels like we need to define what happens when various algorithms are cancelled halfway through. Eg, what happens if a service worker is killed half way through install, fetch, etc. |
I agree that we need to define what happens to in-flight tasks. However, for the purpose of a killswitch, it would be nice if that definition was centralized/global, rather than relying on the individual design of each algorithm. Is it possible to just drop every task on the floor, have fetches fallback to network, nuke a top level state container, and let GC do its thing? |
TODO:
|
We'd also need to do something about ongoing background fetches. This is why I think we need to spec this a little more explicitly rather than try and hand-wave it. However, these aren't problems created by Clear Site Data. We just haven't been clear about how registrations are cleaned up so far. |
Makes sense. I've added the background fetches to the TODO. I'm hoping we can apply the fetch group concept and do something similar for service workers. |
Intended to be a killswitch mechanism for all service workers associated with an origin. In the short term, designed to be used directly by Clear Site Data.
Context:
#614 (comment)
Eventually will resolve:
w3c/webappsec-clear-site-data#54
cc @jungkees @mattto @jakearchibald
Preview | Diff